package cc.rengu.igas.bomp.common.enums;

/**
 * Created by zhangxuran on 2020/04/22
 */
public enum LicenseTypeEnum {
    BUSINESS_LICENSE("00", "营业执照"),
    ORG_CREDIT_CODE_LICENSE("01", "机构信用代码证"),
    PRIVATE_NON_ENTERPRISE_REGIST_CERT("02", "民办非企业登记证书"),
    NATIONAL_ORG_CODE_CERT("03", "全国组织机构代码证)"),
    INSTITUTE_ARTIF_CERT("04", "事业单位法人证书"),
    OUT_ENTERPRISE_CERT("05", "境外企业证书"),
    SOCIAL_ORG_REGIST_CERT("06", "社会团体法人登记证书"),
    LEGAL_ARTIF_CERT("07", "工会法人资格证书"),
    GOVERMENT_DOCUMENT("08", "政府批文"),
    PRIOR_APPROVAL_NOTICE("09", "预先核准通知书"),
    OTHER_APPROVAL("10", "其他批文或证明"),
    LOANS_ACCTNO("11", "贷款卡号"),
    PAID_SERVICE_CERT("12", "有偿服务许可证(军队医院适用)"),
    MEDICAL_PRACTICE_LICENSE("13", "医疗执业许可证照(军队医院适用)"),
    PARTY_BUSINESS_LICENSE("14", "企业营业执照(挂靠企业的党组织适用)"),
    ARTIF_REG_CERT("15", "基金会法人登记证书"),
    CHARITABLE_ORGANIZATION_CERT("16", "慈善组织公开募捐资格证书"),
    AGRICULTURAL_COOPERATIVE_CERT("17", "农民专业合作社法人营业执照"),
    RELIGION_ORGANIZATION_CERT("18", "宗教活动场所登记证"),
    OTHER("99", "其他"),

    ;

    private String licenseType;
    private String licenceDesc;

    LicenseTypeEnum(String licenseType, String licenceDesc) {
        this.licenseType = licenseType;
        this.licenceDesc = licenceDesc;
    }

    public String getLicenseType() {
        return licenseType;
    }

    public void setLicenseType(String licenseType) {
        this.licenseType = licenseType;
    }

    public String getLicenceDesc() {
        return licenceDesc;
    }

    public void setLicenceDesc(String licenceDesc) {
        this.licenceDesc = licenceDesc;
    }

    /*
     * 根据营业执照编码查询营业执照信息
     * @param licenseType 营业执照类型编码
     * return licenceDesc 营业执照信息
     * */
    public static String getLicenceDescBylicenseType(String licenseType) {
        for (LicenseTypeEnum licenseTypeEnum : LicenseTypeEnum.values()) {
            if (licenseTypeEnum.getLicenseType().equals(licenseType)) {
                return licenseTypeEnum.getLicenceDesc();
            }
        }
        return null;
    }
}
